POV-Ray : Newsgroups : povray.general : Differences with Large Unions : Re: Differences with Large Unions Server Time
8 Aug 2024 04:10:06 EDT (-0400)
  Re: Differences with Large Unions  
From: Geoff Wedig
Date: 13 Mar 2001 09:46:00
Message: <3aae32a8@news.povray.org>
Francois Labreque <fla### [at] videotronca> wrote:
>> 
>> difference
>> {
>>   union
>>   {
>>     smallobject1
>>     smallobject2
>>     smallobject3
>>     smallobject4
>>     .
>>     .
>>     .
>>     smallobjectn
>>   }
>>   anotherobject
>> }
>> 
>> it could turn it into:
>> 
>> union
>> {
>>   difference { smallobject1 anotherobject }
>>   smallobject2
>>   smallobject3
>>   smallobject4
>> }
>> 
>> assuming that only smo1 intersected ano's bounding box.  I would think this
>> would speed things up.  Could work for intersections too.  Of course, some
>> heuristics would need to be generated to determine when to do the level
>> swapping, and I have no idea how to do that.

> It would indeed appear to be feasible, but a b*tch to program as YOU
> know that you want to cut out ano from smo1, but POV has no way of
> knowing that this is what YOU want.  Unless your objects are randomly
> placed at runtime (or move around in an animation), I think it's
> probably better if you optimise your CSG-tree by hand.

Well, you want to cut ano from all of the so's, but some of them don't need
any cutting.  

And yeah, my objects are pseudo random, so it's not so simple to optimize by
hand, but I think I can write the algorithm to do it.

Geoff


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.